package com.suixinsanren.design.compound.demo02;

public class CountingDuckFactory extends AbstractDuckFactory {
    @Override
    QuackAble createMallardDuck() {
        return new QuackCounter(new MallardDuck());
    }

    @Override
    QuackAble createRedHeadDuck() {
        return new QuackCounter(new RedHeadDuck());
    }

    @Override
    QuackAble createRubberDuck() {
        return new QuackCounter(new RubberDuck());
    }

    @Override
    QuackAble createDuckCall() {
        return new QuackCounter(new DuckCall());
    }
}
